// 路径定义
require.config({
    baseUrl: '',
    urlArgs: "v=" + new Date().getTime(),
    waitSeconds: 0,
    shim: {
		// 非AMD模式，模块化定义，确定依赖和输出
		'tools': {
		    deps: [
		        'jquery'
		    ],
		    exports: 'tools'
		},
        'tools': {
            deps: ['jquery'],
            exports: 'tools'
        },
        'swipe':{
        	deps: [
    	       'jquery'
	        ],
	        exports: 'swipe'
        },
        'angular':{
            exports: 'angular'
        },
        'angular-route':{
        	deps: ['angular']
        }
    },
    paths: {
        // lib 
        jquery: 'static/js/lib/jquery-1.11.2.min',
        bootstrap: 'static/js/lib/bootstrap',
        tools:'static/js/lib/tools-lib',
        text:'static/js/lib/text-min',
        template:'static/js/lib/template',
        angular:'static/js/lib/angular.min',
    	'angular-route':'static/js/lib/angular-route.min',
        'angular-ui-router':'static/js/lib/angular-ui-router.min'
    }
});

var body = document.body||document.getElementsByTagName("body")[0],pageJs,pageJsPrefix="";
pageJs = body&&body.getAttribute("data-js")?body.getAttribute("data-js"):"";
if(pageJs.length){
    var arr=pageJs.split(" ");
    for(var i=0;i<arr.length;i++){
        arr[i]=arr[i].indexOf(".js")==-1?(pageJsPrefix+arr[i]+".js"):pageJsPrefix+arr[i];
    }
    require([arr.join(",")],function(){});
}

